/**
 * 
 */
package quartz.job;

import java.text.SimpleDateFormat;
import java.util.Date;

import org.quartz.Job;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import org.quartz.Trigger;

public class HelloJobTrigger implements Job {

	/* 
	 */
	@Override
	public void execute(JobExecutionContext context) throws JobExecutionException {
		Date date = new Date();
		SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
		Trigger trigger = context.getTrigger();
		System.out.println("任务开始执行时间:     " + dateFormat.format(trigger.getStartTime()));
		System.out.println("任务结束时间:     " + dateFormat.format(trigger.getEndTime()));
	}

}
